<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
%>
<form id="pagerForm" method="post" action="<%=path%>/product/findAll.do"> 
	<input type="hidden" name="pageNum" value="1" /> 
	<input type="hidden" name="numPerPage" value="${pager.numPerPage}" />
</form>
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="demo_page1.html"
		method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>名称：<input type="text" name="keyword" /></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">检索</button>
							</div>
						</div></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<c:url value="/client/add.do"/>" target="navTab"><span>添加客户</span></a></li>
			<li><a class="delete"
				href="<%=path %>/client/delete/{clientId}.do" target="ajaxTodo"
				title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="<%=path %>/client/edit/{clientId}.do"
				target="navTab"><span>修改</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="80" align="center">客户名</th>
				<th width="120" align="center">联系电话</th>
				<th width="120" align="center">密码</th>
				<th width="100" align="center">地址</th>
				<th width="150" align="center">所属片区</th>				
				<th width="80"> 备注</th>		
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${clients}" var="client" varStatus="status">
			<tr target="clientId" rel="${client.id}">
				<td>${client.name}</td>
				<td>${client.phone}</td>
				<td>${client.pwd}</td>
				<td>${client.address}</td>
				<td>
${client.area.name}
</td>			
				<td>${client.remark}</td>				
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select> <span>条，共${pager.totalCount}条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="${pager.totalCount}" numPerPage="${pager.numPerPage}" pageNumShown="10" currentPage="${pager.currentPage} }"></div>

	</div>
</div>